package co.edu.unal.geditor.model;

import java.awt.Color;
import java.awt.Point;

public abstract class GeometricGraphElement extends GraphElement
{
	private static final long serialVersionUID = 1L;

	// method overloading
	protected GeometricGraphElement( Point pUL, Point pBD )
	{
		// call next constructor width default width value
		this( pUL, pBD, defaultLinesColor );
	}

	// method overloading
	protected GeometricGraphElement( Point pUL, Point pBD, Color linesColor )
	{
		// call super class constructor
		this( pUL, pBD, linesColor, 1 );
	}

	// method overloading
	protected GeometricGraphElement( Point pUL, Point pBD, Color color, int nLineWidth )
	{
		// call super class constructor
		super( pUL, pBD, color );

		// set line width
		setLineWidth( nLineWidth );
	}

	public int getLineWidth()
	{
		return m_nLineWidth;
	}

	public void setLineWidth( int lineWidth )
	{
		assert lineWidth > 0;
		
		m_nLineWidth = lineWidth;
	}

	protected int m_nLineWidth;
}